from src.Dao.StoreDao import StoreDao
from src.Utils.index import ResponseService,colored_text

storeDB = StoreDao()

class StoreService:
    
    def __init__(self):
        pass
    
    def getStoreInfo(self,id: int):
        if type(id) is not int:
            print(colored_text("查询的店铺id非法","red"))
        else:
            res = storeDB.get_storeinfo_by_id(id)
            if not res:
                return ResponseService.error(None,'未查询到店铺信息!')
            else:
                return ResponseService.success(res,'查询成功')